On continuation-passing transformations and expected cost analysis
نویسندگان
چکیده
We define a continuation-passing style (CPS) translation for typed ?-calculus with probabilistic choice, unbounded recursion, and tick operator — modeling cost. The target language is (non-probabilistic) ?-calculus, enriched type of extended positive reals fixpoint operator. then show that applying the CPS transform an expression M to continuation ? v . 0 yields expected cost also introduce formal system higher-order logic, called EHOL, prove it sound, can derive tight upper bounds on classic examples, including Coupon Collector Random Walk. Moreover, we relate our Kaminski et al.’s ert-calculus, showing latter be recovered by (a generalization of) embedding imperative programs into ?-calculus. Finally, used compute pre-expectations reason about almost sure termination.
منابع مشابه
Linear Continuation-Passing
Continuations can be used to explain a wide variety of control behaviours, including calling/returning (procedures), raising/handling (exceptions), labelled jumping (goto statements), process switching (coroutines), and backtracking. However, continuations are often manipulated in a highly stylised way, and we show that all of these, bar backtracking, in fact use their continuations linearly ; ...
متن کاملContinuation - Passing Semantics for Concurrency —
We investigate the formal design of concurrent languages in continuation-passing style (CPS). We present a continuation-based denotational semantics for an abstract language providing operators for nondeterministic choice, sequential and parallel composition, and a general mechanism of interaction between multisets of distributed actions. We show that the basic laws of concurrent systems are sa...
متن کاملCall-by-Need and Continuation-Passing Style
This paper examines the transformation of call-by-need terms into continuation passing style (CPS). It begins by presenting a simple transformation of call-by-need terms into program graphs and a reducer for such graphs. From this, an informal derivation is carried out, resulting in a translation from terms into self-reducing program graphs, where the graphs are represented as CPS terms involvi...
متن کاملMercury: Object-Affinity Scheduling and Continuation Passing on Multiprocessors
Mercury 12, 17] is a system designed to explore methods for improving the performance of \natural grain" parallel object-oriented programs on shared memory multiprocessors with hardware-coherent caches. The novel aspects of Mercury are a locality-conscious implementation of user-level threads, new scheduling techniques based on object aanity, and a lightweight task management mechanism that use...
متن کاملDocument Analysis And Classification Based On Passing Window
In this paper we present Document analysis and classification system to segment and classify contents of Arabic document images. This system includes preprocessing, document segmentation, feature extraction and document classification. A document image is enhanced in the preprocessing by removing noise, binarization, and detecting and correcting image skew. In document segmentation, an algorith...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
ژورنال
عنوان ژورنال: Proceedings of the ACM on programming languages
سال: 2021
ISSN: ['2475-1421']
DOI: https://doi.org/10.1145/3473592